#pragma once
#include "image2d_ptr.h"

namespace Image2D
{

IMAGE2D_API int imageReadToGray     (std::string fileName, Image2D_Ptr& i2d);
IMAGE2D_API int imageReadToRgb      (std::string fileName, Image2D_Ptr& i2d);
IMAGE2D_API int imageReadToBgr      (std::string fileName, Image2D_Ptr& i2d);
IMAGE2D_API int imageReadToYuv420p  (std::string fileName, Image2D_Ptr& i2d);
IMAGE2D_API int imageReadToNv12     (std::string fileName, Image2D_Ptr& i2d);

IMAGE2D_API int imageWriteJpegFromGray    (std::string fileName, const Image2D_Ptr& i2d, int quality = 100);
IMAGE2D_API int imageWriteJpegFromRgb     (std::string fileName, const Image2D_Ptr& i2d, int quality = 100);
IMAGE2D_API int imageWriteJpegFromBgr     (std::string fileName, const Image2D_Ptr& i2d, int quality = 100);
IMAGE2D_API int imageWriteJpegFromYuv420p (std::string fileName, const Image2D_Ptr& i2d, int quality = 100);
IMAGE2D_API int imageWriteJpegFromNv12    (std::string fileName, const Image2D_Ptr& i2d, int quality = 100);

IMAGE2D_API int imageWriteBmpFromGray     (std::string fileName, const Image2D_Ptr& i2d);
IMAGE2D_API int imageWriteBmpFromRgb      (std::string fileName, const Image2D_Ptr& i2d);
IMAGE2D_API int imageWriteBmpFromBgr      (std::string fileName, const Image2D_Ptr& i2d);
IMAGE2D_API int imageWriteBmpFromYuv420p  (std::string fileName, const Image2D_Ptr& i2d);
IMAGE2D_API int imageWriteBmpFromNv12     (std::string fileName, const Image2D_Ptr& i2d);

IMAGE2D_API int imageWritePngFromGray     (std::string fileName, const Image2D_Ptr& i2d);
IMAGE2D_API int imageWritePngFromRgb      (std::string fileName, const Image2D_Ptr& i2d);
IMAGE2D_API int imageWritePngFromBgr      (std::string fileName, const Image2D_Ptr& i2d);
IMAGE2D_API int imageWritePngFromYuv420p  (std::string fileName, const Image2D_Ptr& i2d);
IMAGE2D_API int imageWritePngFromNv12     (std::string fileName, const Image2D_Ptr& i2d);

}